//
//  HSYNavigationBar.h
//  HSYCustomNavigationController
//
//  Created by key on 2017/2/9.
//  Copyright © 2017年 Scho.CustomNavigationController.Demo. All rights reserved.
//

#import <UIKit/UIKit.h>

@class HSYNavigationItem;
@class HSYBarButton;

@protocol HSYNavigationBarDelegate <NSObject>

@optional
- (void)didClickBackBarButton:(HSYBarButton *)barButton;
- (void)didClickLeftBarButton:(HSYBarButton *)barButton;

@end

@interface HSYNavigationBar : UIView

@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) UIView *titleView;
@property (nonatomic, weak) id<HSYNavigationBarDelegate>delegate;
@property (nonatomic, strong, readonly) HSYBarButton *backBarButton;

- (instancetype)initWithLeftItems:(NSArray <HSYNavigationItem *>*)leftItems;
- (instancetype)initWithRightItems:(NSArray <HSYNavigationItem *>*)rightItems;
- (instancetype)initWithLeftItems:(NSArray <HSYNavigationItem *>*)leftItems forRightItems:(NSArray <HSYNavigationItem *>*)rightItems;

@end
